using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._SegmentationandClassification
{
    /// <summary>
    /// <para>Classify Raster</para>
    /// <para>Classifies a raster dataset based on an Esri classifier definition file (.ecd) and raster dataset inputs.</para>
    /// <para>根据 Esri 分类器定义文件 （.ecd） 和栅格数据集输入对栅格数据集进行分类。</para>
    /// </summary>    
    [DisplayName("Classify Raster")]
    public class ClassifyRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ClassifyRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster dataset to classify.</para>
        /// <para>要分类的栅格数据集。</para>
        /// </param>
        /// <param name="_in_classifier_definition">
        /// <para>Input Classifier Definition File</para>
        /// <para>The input Esri classifier definition file (.ecd) containing the statistics for the chosen attributes for the classifier.</para>
        /// <para>输入 Esri 分类器定义文件 （.ecd），其中包含分类器所选属性的统计数据。</para>
        /// </param>
        /// <param name="_out_raster_dataset">
        /// <para>Output Classified Raster</para>
        /// <para><xdoc>
        ///   <para>The path and name of the classified image you are creating.</para>
        ///   <para>The output classified raster is defined by the input raster dataset and .ecd file inputs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的分类映像的路径和名称。</para>
        ///   <para>输出分类栅格由输入栅格数据集和 .ecd 文件输入定义。</para>
        /// </xdoc></para>
        /// </param>
        public ClassifyRaster(object _in_raster, object _in_classifier_definition, object _out_raster_dataset)
        {
            this._in_raster = _in_raster;
            this._in_classifier_definition = _in_classifier_definition;
            this._out_raster_dataset = _out_raster_dataset;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Classify Raster";

        public override string CallName => "sa.ClassifyRaster";

        public override List<string> AcceptEnvironments => ["compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _in_classifier_definition, _out_raster_dataset, _in_additional_raster];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster dataset to classify.</para>
        /// <para>要分类的栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Input Classifier Definition File</para>
        /// <para>The input Esri classifier definition file (.ecd) containing the statistics for the chosen attributes for the classifier.</para>
        /// <para>输入 Esri 分类器定义文件 （.ecd），其中包含分类器所选属性的统计数据。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Classifier Definition File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_classifier_definition { get; set; }


        /// <summary>
        /// <para>Output Classified Raster</para>
        /// <para><xdoc>
        ///   <para>The path and name of the classified image you are creating.</para>
        ///   <para>The output classified raster is defined by the input raster dataset and .ecd file inputs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的分类映像的路径和名称。</para>
        ///   <para>输出分类栅格由输入栅格数据集和 .ecd 文件输入定义。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Classified Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster_dataset { get; set; }


        /// <summary>
        /// <para>Additional Input Raster</para>
        /// <para>Ancillary raster datasets, such as a multispectral image or a DEM, will be incorporated to generate attributes and other required information for the classifier. This raster is necessary when calculating attributes such as mean or standard deviation. This parameter is optional.</para>
        /// <para>辅助栅格数据集（例如多光谱影像或 DEM）将被合并，以生成分类器的属性和其他所需信息。在计算均值或标准差等属性时，此栅格是必需的。此参数是可选的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Additional Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_additional_raster { get; set; } = null;


        public ClassifyRaster SetEnv(object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}